.class Lcom/melesta/engine/Helpers;
.super Ljava/lang/Object;
.source "Helpers.java"


# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 12
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static goGetIntValue(Ljava/lang/Object;I)I
    .locals 2
    .parameter "o"
    .parameter "defVal"

    .prologue
    .line 15
    if-eqz p0, :cond_0

    .line 17
    :try_start_0
    check-cast p0, Ljava/lang/Integer;

    .end local p0
    invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    .line 23
    :goto_0
    return v0

    .line 19
    :catch_0
    move-exception v1

    :cond_0
    move v0, p1

    .line 23
    goto :goto_0
.end method

.method static runFbRequestOnUiThread(Lcom/melesta/engine/EngineActivity;Lcom/facebook/Request;)V
    .locals 1
    .parameter "me"
    .parameter "request"

    .prologue
    .line 27
    new-instance v0, Lcom/melesta/engine/Helpers$1;

    invoke-direct {v0, p1}, Lcom/melesta/engine/Helpers$1;-><init>(Lcom/facebook/Request;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 38
    return-void
.end method

.method static showFeedDialogWithoutNotificationBar(Landroid/content/Context;Landroid/os/Bundle;Lcom/facebook/widget/WebDialog$OnCompleteListener;)V
    .locals 5
    .parameter "context"
    .parameter "params"
    .parameter "listener"

    .prologue
    const/16 v4, 0x400

    .line 53
    new-instance v2, Lcom/facebook/widget/WebDialog$FeedDialogBuilder;

    invoke-static {}, Lcom/facebook/Session;->getActiveSession()Lcom/facebook/Session;

    move-result-object v3

    invoke-direct {v2, p0, v3, p1}, Lcom/facebook/widget/WebDialog$FeedDialogBuilder;-><init>(Landroid/content/Context;Lcom/facebook/Session;Landroid/os/Bundle;)V

    invoke-virtual {v2, p2}, Lcom/facebook/widget/WebDialog$FeedDialogBuilder;->setOnCompleteListener(Lcom/facebook/widget/WebDialog$OnCompleteListener;)Lcom/facebook/widget/WebDialog$BuilderBase;

    move-result-object v2

    check-cast v2, Lcom/facebook/widget/WebDialog$FeedDialogBuilder;

    invoke-virtual {v2}, Lcom/facebook/widget/WebDialog$FeedDialogBuilder;->build()Lcom/facebook/widget/WebDialog;

    move-result-object v0

    .line 57
    .local v0, dialog:Lcom/facebook/widget/WebDialog;
    invoke-virtual {v0}, Lcom/facebook/widget/WebDialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    .line 58
    .local v1, dialog_window:Landroid/view/Window;
    invoke-virtual {v1, v4, v4}, Landroid/view/Window;->setFlags(II)V

    .line 60
    invoke-virtual {v0}, Lcom/facebook/widget/WebDialog;->show()V

    .line 61
    return-void
.end method

.method static showRequestDialogWithoutNotificationBar(Landroid/content/Context;Landroid/os/Bundle;Lcom/facebook/widget/WebDialog$OnCompleteListener;)V
    .locals 5
    .parameter "context"
    .parameter "params"
    .parameter "listener"

    .prologue
    const/16 v4, 0x400

    .line 42
    new-instance v2, Lcom/facebook/widget/WebDialog$RequestsDialogBuilder;

    invoke-static {}, Lcom/facebook/Session;->getActiveSession()Lcom/facebook/Session;

    move-result-object v3

    invoke-direct {v2, p0, v3, p1}, Lcom/facebook/widget/WebDialog$RequestsDialogBuilder;-><init>(Landroid/content/Context;Lcom/facebook/Session;Landroid/os/Bundle;)V

    invoke-virtual {v2, p2}, Lcom/facebook/widget/WebDialog$RequestsDialogBuilder;->setOnCompleteListener(Lcom/facebook/widget/WebDialog$OnCompleteListener;)Lcom/facebook/widget/WebDialog$BuilderBase;

    move-result-object v2

    check-cast v2, Lcom/facebook/widget/WebDialog$RequestsDialogBuilder;

    invoke-virtual {v2}, Lcom/facebook/widget/WebDialog$RequestsDialogBuilder;->build()Lcom/facebook/widget/WebDialog;

    move-result-object v0

    .line 46
    .local v0, dialog:Lcom/facebook/widget/WebDialog;
    invoke-virtual {v0}, Lcom/facebook/widget/WebDialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    .line 47
    .local v1, dialog_window:Landroid/view/Window;
    invoke-virtual {v1, v4, v4}, Landroid/view/Window;->setFlags(II)V

    .line 49
    invoke-virtual {v0}, Lcom/facebook/widget/WebDialog;->show()V

    .line 50
    return-void
.end method
